<?xml version="1.0" encoding="UTF-8"?>
<!-- 16-07-2004 edit by Ron van Ardenne (www.batavia-xbrl.com / J2R BV) -->
<!-- XBRL 2.1 Tests -->
<!-- Copyright 2003 XBRL International.  See www.xbrl.org/legal.  All Rights Reserved. -->
<?xml-stylesheet type="text/xsl" href="../../testcase.xsl"?>
<testcase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Tuple" description="Section 4.5 The tuple element" outpath="out" owner="n-sanbuichi@hitachi-system.co.jp" xsi:noNamespaceSchemaLocation="../lib/test.xsd" minimal="true">
        <variation id="V-1" name="SpecTupleExample">
                <description>104.01 Tuples are derived from tupleType.</description>
                <data>
                        <xsd readMeFirst="false">104-01-SpecTupleExample.xsd</xsd>
                        <instance readMeFirst="true">104-01-SpecTupleExample.xml</instance>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-2" name="TupleExampleAnyOrder">
                <description>104.02 Tuples are derived from tupleType and subelements all appear as references.</description>
                <data>
                        <xsd readMeFirst="false">104-02-TupleExampleAnyOrder.xsd</xsd>
                        <instance readMeFirst="true">104-02-TupleExampleAnyOrder.xml</instance>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-3" name="TupleExampleCardinality">
                <description>104.03 Subelements of a tuple may use minOccurs and maxOccurs.</description>
                <data>
                        <xsd readMeFirst="false">104-03-TupleExampleCardinality.xsd</xsd>
                        <instance readMeFirst="true">104-03-TupleExampleCardinality.xml</instance>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-4" name="TupleExampleComplexType">
                <description>104.04 Tuples may be defined as a complex type.</description>
                <data>
                        <xsd readMeFirst="false">104-04-TupleExampleComplexType.xsd</xsd>
                        <instance readMeFirst="true">104-04-TupleExampleComplextype.xml</instance>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-5" name="TupleExampleNestedComplexType">
                <description>104.05 Tuples may be defined as a complex type containing other tuples.</description>
                <data>
                        <xsd readMeFirst="false">104-05-TupleExampleNestedComplexType.xsd</xsd>
                        <instance readMeFirst="true">104-05-TupleExampleNestedComplextype.xml</instance>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-6" name="TupleCounterExampleNestedComplexType">
                <description>104.06 Anonymous type definitions are fine, per erratum 054.</description>
                <data>
                        <xsd readMeFirst="true">104-06-TupleCounterExampleNestedComplexType.xsd</xsd>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-7" name="TupleChoiceExample">
                <description>104.07 Tuples may be defined using choice, sequence and all elements.</description>
                <data>
                        <xsd readMeFirst="false">104-07-TupleChoiceExample.xsd</xsd>
                        <instance readMeFirst="true">104-07-TupleChoiceExample.xml</instance>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-8" name="TupleAnyCounterExample">
                <description>104.08 Tuples can use the any element, section 4.9, point 7, erratum 2.8.</description>
                <data>
                        <xsd readMeFirst="true">104-08-TupleAnyCounterExample.xsd</xsd>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-9" name="TupleAttributeCounterExample">
                <description>104.09 Tuples can have unqualified local attributes other than id.</description>
                <data>
                        <instance readMeFirst="true">104-09-TupleAttributeCounterExample.xml</instance>
                        <xsd>104-09-TupleAttributeCounterExample.xsd</xsd>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-10" name="TupleXBRLAttributeCounterExample">
                <description>104.10 Tuples should not have attributes in XBRL spec defined namespaces.  The tuple declaration allows "anyAttribute", and the instance takes advantage of this by putting xbrli:periodType on the tuple fact.</description>
                <data>
                        <instance readMeFirst="true">104-10-TupleXBRLAttributeCounterExample.xml</instance>
                        <xsd>104-10-TupleXBRLAttributeCounterExample.xsd</xsd>
                </data>
                <result expected="invalid"/>
        </variation>

        <variation id="V-10b" name="TupleXBRLAttributeCounterExample">
                <description>104.10b Tuples should not have attributes in XBRL spec defined namespaces.  Like v-10, but without the instance.  Tests whether processors reject "anyAttribute" in tuple declarations as illegal at the schema level.</description>
                <data>
                        <xsd readMeFirst="true">104-10-TupleXBRLAttributeCounterExample.xsd</xsd>
                </data>
                <result expected="valid"/>
        </variation>

        <variation id="V-10c" name="TupleXBRLAttributeCounterExample">
                <description>104.10c Tuples should not have attributes in XBRL spec defined namespaces.  This schema contains a tuple *requires* the use of xbrli:periodType.</description>
                <data>
                        <xsd readMeFirst="true">104-10c-TupleXBRLAttributeCounterExample.xsd</xsd>
                </data>
                <result expected="invalid"/>
        </variation>

        <variation id="V-10d1" name="TupleXBRLAttributeCounterExample">
                <description>104.10d1 Tuples should not have attributes in XBRL spec defined namespaces.  This variation tests the http://www.xbrl.org/2003/instance namespace, by including a tuple that allows the use of xbrli:periodType.</description>
                <data>
                        <xsd readMeFirst="true">104-10d1-TupleXBRLAttributeCounterExample.xsd</xsd>
                </data>
                <result expected="invalid"/>
        </variation>

        <variation id="V-10d2" name="TupleXBRLAttributeCounterExample">
    <description>104.10d2 Tuples should not have attributes in XBRL spec
    defined namespaces.  This variation tests the http://www.w3.org/1999/xlink
    namespace, by including a tuple that allows the use of
    xlink:href.</description>
                <data>
                        <xsd readMeFirst="true">104-10d2-TupleXBRLAttributeCounterExample.xsd</xsd>
                </data>
                <result expected="invalid"/>
        </variation>

        <variation id="V-10d3" name="TupleXBRLAttributeCounterExample">
    <description>104.10d3 Tuples should not have attributes in XBRL spec
    defined namespaces.  This variation tests the http://www.xbrl.org/2003/linkbase namespace, by including a tuple that allows the use of any attributes from the namespace (there aren't currently any global attributes in this namespace).  Are such wildcards illegal?</description>
                <data>
                        <xsd readMeFirst="true">104-10d3-TupleXBRLAttributeCounterExample.xsd</xsd>
                </data>
                <result expected="valid"/>
        </variation>

        <variation id="V-10d4" name="TupleXBRLAttributeCounterExample">
    <description>104.10d4 Tuples should not have attributes in XBRL spec
    defined namespaces.  This variation tests the http://www.xbrl.org/2003/XLink namespace, by including a tuple that allows the use of any attributes from the namespace (there aren't currently any global attributes in this namespace). Are such wildcards illegal?</description>
                <data>
                        <xsd readMeFirst="true">104-10d4-TupleXBRLAttributeCounterExample.xsd</xsd>
                </data>
                <result expected="valid"/>
        </variation>

        <variation id="V-11" name="TupleGroupCounterExample">
                <description>104.11 Tuples can use the group element.</description>
                <data>
                        <xsd readMeFirst="true">104-11-TupleGroupCounterExample.xsd</xsd>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-12" name="TupleMixedCounterExample">
                <description>104.12 Tuples must not use the mixed attribute.</description>
                <data>
                        <xsd readMeFirst="true">104-12-TupleMixedCounterExample.xsd</xsd>
                </data>
                <result expected="invalid"/>
        </variation>
        <variation id="V-13" name="TupleRestrictionExample">
                <description>104.13 A tuple's content model can be derived by restriction from xsd:anyType.</description>
                <data>
                        <xsd readMeFirst="false">104-13-TupleRestrictionExample.xsd</xsd>
                        <instance readMeFirst="true">104-13-TupleRestrictionExample.xml</instance>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-14" name="TupleNestedRestrictionExample">
                <description>104.14 a tuple's content model may be derived by either restriction or extension from a data type derived by xsd:anyType. This is the case of derivation of restriction.</description>
                <data>
                        <xsd readMeFirst="false">104-14-TupleNestedRestrictionExample.xsd</xsd>
                        <instance readMeFirst="true">104-14-TupleNestedRestrictionExample.xml</instance>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-16" name="TupleAbstractCounterExample">
                <description>Errata #23 - 104.16 Tuple elements can be declared abstract.</description>
                <data>
                        <xsd readMeFirst="true">104-16-TupleAbstractCounterExample.xsd</xsd>
                </data>
                <result expected="valid"/>
        </variation>
        <variation id="V-17" name="TupleAnonymousCounterExample">
    <description>104.17 In the declaration of any tuple in a taxonomy schema,
    declarations of child elements of that tuple MUST be references to global
    element declarations that are in a substitution group that has either item
    or tuple as its head.</description>
                <data>
                        <xsd readMeFirst="true">104-17-TupleAnonymousCounterExample.xsd</xsd>
                </data>
                <result expected="invalid"/>
        </variation>
        <variation id="V-18" name="Redefine">
                <description>104.18 Redefine element MUST NOT be used. This is bug#30 and erratam #30</description>
                <data>
				        <xsd readMeFirst="true">104-18-redefine.xsd</xsd>
                        <xsd readMeFirst="false">104-18-base.xsd</xsd>
                </data>
                <result expected="invalid"/>
        </variation>
        <variation id="V-19" name="Abstract Tuple Definition">
                <description>104.19 Abstract tuple definition can be possible. bug# 31.Erratum#28</description>
                <data>
                        <xsd readMeFirst="true">104-19-abstractTuple.xsd</xsd>
                </data>
                <result expected="valid"/>
        </variation>
        <variation name="Extreme tupe content model" id="V-20">
			<description>104.20 The XBRL 2.1 specification allows concept definitions in the types defined in the XBRL specification. One of the types defined in the specification is xbrli:contextScenarioType that in turns allows ANY content. Concept definitions using the xbrli:contextScenarioType are valid concept definitions but they must be in the xbrli:item or xbrli:tuple substitution groups. This makes possible to define a totally open fact items as in this example.</description>
				<data>
					<instance readMeFirst="true">104-20-extreme-tuple-content-model.xbrl</instance>
				</data>
			<result expected="valid"/>
		</variation>
</testcase>
